package cn.com.qtgl.apis.iam.model.beans;

import cn.com.qtgl.apis.iam.model.enums.DeptSuffix;
import lombok.Getter;
import org.apache.commons.lang3.ObjectUtils;

@Getter
public class DeptFlag implements UserFilterApi{

    private final String deptCode;

    private final DeptSuffix deptSuffix;

    public DeptFlag(String deptCode, DeptSuffix deptSuffix) {
        this.deptCode = ObjectUtils.defaultIfNull(deptCode,"");
        this.deptSuffix = ObjectUtils.defaultIfNull(deptSuffix,DeptSuffix.NONE);
    }

    @Override
    public String getContent() {
        return deptCode+deptSuffix.getFlag();
    }
}
